<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加流水账信息信息</title>
<%@ include file="/WEB-INF/sys/include/css.jsp"%>
</head>
<body>
<form id="form" action="${path}/repertory/saveAccount.json" method="post">
<div class="form">
	<div class="group">
		<div class="label">物资名称:</div>
		<div class="item">${repertory.materialName }</div>
	</div>
	<div class="group">
		<div class="label">*操作类型:</div>
		<div class="item">
			<input type="radio" id="type0" name="type" value="0" checked="checked" /><label for="type0" class="label">新增</label>
			<input type="radio" id="type1" name="type" value="1"  /><label for="type1" class="label">发放</label>
			<input type="radio" id="type2" name="type" value="2"  /><label for="type2" class="label">回收</label>
		</div>
	</div>
	<div class="group">
		<div class="label">*数量:</div>
		<div class="item"><input type="text" name="number" id="number" maxlength="20" /></div>
	</div>
	<div class="group">
		<div class="label">*操作时间:</div>
		<div class="item"><input type="text" name="operate_time" id="operate_time" ltype="date" maxlength="20" /></div>
	</div>
	<div class="group">
		<div class="label">*负责人:</div>
		<div class="item"><input type="text" name="responsible" id="responsible" maxlength="20" /></div>
	</div>
	<div class="group">
		<div class="label">备注:</div>
		<div class="item"><textarea id="remark" name="remark"></textarea></div>
	</div>
	<div class="buttons">
		<button class="highlight" id="submit1" type="button">确定</button>
		<button type="button" id="cancel1">取消</button>
		<input type="hidden" name="repertoryid" id="" value="${repertory.repertoryid }"/>
	</div>
</div>
</form>
<%@ include file="/WEB-INF/sys/include/script.jsp"%>
<script type="text/javascript">
$(function() {
	$("#form").ligerForm({inputWidth: 300});
	
	verifyForm("form", {}, function(){
		$("#form").ajaxForm(function(data){
			UiUtil.isSuccess(data, "添加库存信息成功", function(){
				UiUtil.closeForm(true);
				//$.dialog.close();
			});
		});
	});
	
	$("#submit1").click(function(){
		UiUtil.lockButton('submit1');
		$("#form").submit();
	});

	$("#cancel1").click(function(){
		UiUtil.closeForm();
		//$.dialog.close();
	});
	
});
</script>
</body>
</html>